#include <stdio.h>
#include <math.h>
#include <time.h>
int main()
{
	int i,j;
	int a[100];
	int max=0;
	int m=100;
	float b[100];
	float max1=0.0;
	float m1=100.0;
	float ave=0.0;
	float ave1=0.0;
	srand((unsigned)time(NULL));
	for(i=0;i<100;i++)
	{
		a[i]=rand()%100;

		if(a[i]==0)
			b[i]=0;
		else
			b[i]=1.0/a[i];
	
	printf("%d %d %f\n",i,a[i],b[i]);
	}
	for(j=0;j<100;j++)
	{
	if(max<a[j])
	max=a[j];
	if(m>a[j])
	m=a[j];
	if(max1<b[j])
	max1=b[j];
	if(m1>b[j])
	m1=b[j];
	}
	printf("max:%d %f\n",max,max1);
	printf("min:%d %f\n",m,m1);
	float sum;
	float sum1;
	for(i=0;i<100;i++)
	{
	sum=sum+a[i];
	sum1=sum1+b[i];
	}
	ave=sum/100;
	ave1=sum1/100;
	printf("ave:%f %f\n",ave,ave1);
	return 0;
}











